fix: folder tree selection after any action in main content#59359
Conversation
| const isFolderTreeNode = computed(() => props.view.id.startsWith(`${folderTreeId}::`)) | ||
| const isDirectoryActive = computed(() => { | ||
| if (!isFolderTreeNode.value) { | ||
| return false | ||
| } | ||
|
|
||
| const currentView = String(route.params?.view ?? '') | ||
| const currentDir = normalizeDir(route.query?.dir) | ||
| const viewDir = normalizeDir(props.view.params?.dir) | ||
|
|
||
| return currentView === folderTreeId && currentDir === viewDir | ||
| }) |
There was a problem hiding this comment.
Can't really say I'm happy to see custom view code into a global component, but I don't really see a better way, that's correct yeah 🤔
There was a problem hiding this comment.
Seems like a router issue / design problem.
Because the URL is bound to active file not active folder (/files/ACTIVEFILE?dir=ACTIVEFOLDER vs /files/ACTIVEFOLDER?file=ACTIVEFILE)
So this happens because we se the to of the view to /files/FOLDERID right?
Does it work if we instead just use "additional params" and use the dir param?
There was a problem hiding this comment.
@susnux I update some codes to make tree view selection works properly as expected.
For a technical overview, I have the FolderNavigationListItem to be active according to dir parameter of the route.
I'd appreciate it if you review and share any opinion on it.
86139a8 to
8306091
Compare
8e5c85f to
a7172a3
Compare
|
@susnux I updated the code with the latest master branch. |
aaf8ec9 to
f7243b8
Compare
a43ee10 to
be24676
Compare
be24676 to
69fe46e
Compare
69fe46e to
7cc4c09
Compare
7cc4c09 to
339d4f9
Compare
|
Hello there, We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process. Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6 Thank you for contributing to Nextcloud and we hope to hear from you soon! (If you believe you should not receive this message, you can add yourself to the blocklist.) |
|
@susnux can you review this PR please? |
f1b4dc7 to
9c6022f
Compare
susnux
left a comment
There was a problem hiding this comment.
seems to fix the issue, thank you!
9c6022f to
6e43d40
Compare
|
@susnux can you provide me any updates please? |
6e43d40 to
4fb13de
Compare
|
@szaimen , as far as I checked the test fails, they are not related to mine. |
|
@szaimen can you provide me any updates on this PR please? |
Signed-off-by: mykh-hailo <kristianderonta0205@gmail.com>
4fb13de to
5380fd6
Compare
|
@szaimen the test fails again which is not related to mine. |
|
@susnux can you please help @mykh-hailo to move the PR forward? |
|
@susnux can you help me to move this PR forward? |
|
@susnux , the test is again failed. |
|
/backport to stable34 |
|
/backport to stable33 |
|
@mykh-hailo thank you very much for your contribution! |
Summary
his PR improves UI behavior and layout consistency in file navigation.
It fixes incorrect selection behavior in the Files left sidebar for folder-tree entries.
Checklist
3. to review, feature component)stable32)AI (if applicable)